export const WATER = 'water'
export const WATER_ZH = '水'
export const WATER_TEXT = '用水量'
export const ELECTRIC = 'electric'
export const ELECTRIC_ZH = '电'
export const ELECTRIC_TEXT = '用电量'
export const GAS = 'gas'
export const GAS_ZH = '气'
export const GAS_TEXT = '用气量'
export const COMPREHENSIVE_CONSUMPTION = 'comprehensive-consumption'
export const COMPREHENSIVE_CONSUMPTION_ZH = '综合能源消费量'
export const COMPREHENSIVE_CONSUMPTION_TEXT = '综合能耗'

// 3.3+
export const COAL = 'coal'
export const COAL_ZH = '煤'
export const COAL_TEXT = '用煤量'
export const OTHER = 'other'
export const OTHER_ZH = '其他能源'
export const OTHER_TEXT = '其他能源'

// 能源种类
export const ENERGY_VARIETY = [
  { name: ELECTRIC_ZH, value: ELECTRIC },
  // { name: WATER_ZH, value: WATER },
  { name: COAL_ZH, value: COAL },
  { name: GAS_ZH, value: GAS },
  { name: OTHER_ZH, value: OTHER },
]

// 能源单位
export const ENERGY_UNITS = [
  { key: WATER, value: '吨', unit: 't' },
  { key: ELECTRIC, value: '千瓦时', unit: 'kwh' },
  { key: GAS, value: '立方米', unit: 'm³' },
  { key: COAL, value: '吨', unit: 't' },
  { key: OTHER, value: '吨标准煤', unit: 'tce' },
]

/**
 * 进度节能目标完成情况表     1
 * 单位产品综合能耗情况表     2
 * 主要耗能设备状况表         3
 * 节能改造项目情况表         4
 * 能源消费结构表             5
 * 公司产品表                6
 * 公司指标明细表             7
 * 能源消费结构副表          8
 * 企业基本情况表             9
 */


// 进度节能目标完成情况表 Progress energy-saving target completion table
export const PROGRESS_ENERGY_SAVING_TARGET_COMPLETION_TABLE = {
  ID: 1,
  NAME: '进度节能目标完成情况表',
  COLUMNS: [
    { label: '项目', prop: 'projectName', readonly: true },
    { label: '计量单位', prop: 'unitOfMeasurement', readonly: true },
    { label: '代码', prop: 'code', readonly: true },
    { label: '2021年', prop: 'oneYear' },
    { label: '备注', prop: 'oneRemark', hidden: true },
    { label: '2021至2022年', prop: 'twoYear' },
    { label: '备注', prop: 'twoRemark', hidden: true },
    { label: '2021至2023年', prop: 'threeYear' },
    { label: '备注', prop: 'threeRemark', hidden: true },
    { label: '2021至2024年', prop: 'fourYear' },
    { label: '备注', prop: 'fourRemark', hidden: true },
    { label: '2021至2025年', prop: 'fiveYear' },
    { label: '备注', prop: 'fiveRemark', hidden: true },
  ]
}

// 单位产品综合能耗情况表 Table of comprehensive energy consumption per unit product
export const TABLE_OF_COMPREHENSIVE_ENERGY_CONSUMPTION_PER_UNIT_PRODUCT = {
  ID: 2,
  NAME: '单位产品综合能耗情况表',
  COLUMNS: [
    { label: '指标名称', prop: 'name', rowspan: 2 },
    {
      label: '计量单位',
      prop: 'A',
      colspan: 3,
      children: [
        { label: '指标单位', prop: 'unit' },
        { label: '子项单位', prop: 'subunit' },
        { label: '母项单位', prop: 'parentUnit' },
      ]
    },
    { label: '单位换算系数', prop: 'unitConversionFactor', rowspan: 2, },
    { label: '代码', prop: 'code', rowspan: 2, },
    {
      label: '本年度',
      prop: 'B',
      colspan: 3,
      children: [
        { label: '指标值', prop: 'indexValue' },
        { label: '子项值', prop: 'childValue' },
        { label: '母项值', prop: 'parentValue' },
      ]
    },
    {
      label: '上年度',
      prop: 'C',
      colspan: 3,
      children: [
        { label: '指标值', prop: 'indexValueOne' },
        { label: '子项值', prop: 'childValueOne' },
        { label: '母项值', prop: 'parentValueOne' },
      ]
    },
    { label: '国家（地区）限额', prop: 'areaQuota', rowspan: 2, },
    { label: '影响指标变化因素的说明', prop: 'remark', rowspan: 2, },
  ],
}

// 主要耗能设备状况表 Condition table of major energy-consuming equipment
export const CONDITION_TABLE_OF_MAJOR_ENERGY_CONSUMING_EQUIPMENT = {
  ID: 3,
  NAME: '主要耗能设备状况表',
  COLUMNS: [
    {
      label: '主要耗能设备名称',
      prop: 'A',
      children: [
        { label: '设备类型', prop: 'equipmentType' },
        { label: '序号', prop: 'serialNumber' },
        { label: '设备名称', prop: 'equipmentName' },
      ]
    },
    {
      label: '设备概况',
      prop: 'B',
      children: [
        { label: '型号', prop: 'model' },
        { label: '功率/容量', prop: 'powerCapacity' },
        { label: '主要技术参数', prop: 'mainTechnicalParameters' },
      ]
    },
    {
      label: '设备运行概况',
      prop: 'C',
      children: [
        { label: '负载率', prop: 'loadRate', unit: '%' },
        { label: '运行时间', prop: 'operationHours', unit: 'h' },
        { label: '设备大修', prop: 'equipmentOverhaul' },
        { label: '故障', prop: 'fault' },
      ]
    },
    {
      label: '淘汰更新概况',
      prop: 'D',
      children: [
        { label: '是否属于淘汰设备', prop: 'retireEquipment' },
        { label: '计划更新时间', prop: 'scheduledUpdateTime' },
      ]
    },
    {
      label: '监测情况',
      prop: 'E',
      children: [
        { label: '项目', prop: 'project' },
        { label: '指标', prop: 'index' },
      ]
    },
    { label: '备注', prop: 'remark' },
  ]
}

// 节能改造项目情况表 Energy saving renovation project information table
export const ENERGY_SAVING_RENOVATION_PROJECT_INFORMATION_TABLE = {
  ID: 4,
  NAME: '节能改造项目情况表',
  COLUMNS: [
    { label: '项目名称', prop: 'projectName' },
    { label: '主要改造内容', prop: 'mainTransformationContent' },
    { label: '投资金额', prop: 'investmentAmount', unit: '万元' },
    { label: '节能效果', prop: 'energySavingProject', unit: '节能量，吨标准煤/年' },
    { label: '是否合同能源管理模式', prop: 'contractEnergyManagement' },
    { label: '项目进度', prop: 'projectProgress' },
    { label: '审批部门', prop: 'approvalDepartment' },
  ]
}

// 能源消费结构表 Energy consumption structure table
export const ENERGY_CONSUMPTION_STRUCTURE_TABLE = {
  ID: 5,
  NAME: '能源消费结构表',
  COLUMNS: [
    { label: '能源名称', prop: 'energyName' },
    { label: '计量单位', prop: 'unitOfMeasurement' },
    { label: '代码', prop: 'code' },
    { label: '期初库存量', prop: 'beginningInventory' },
    {
      label: '购进量',
      prop: 'E',
      children: [
        { label: '实物量', prop: 'physicalQuantity' },
        { label: '金额', prop: 'amount', unit: '千元' },
      ],
    },
    {
      label: '消费量',
      prop: 'F',
      children: [
        { label: '合计', prop: 'total' },
        { label: '工业生产消费', prop: 'industrialProduction' },
        { label: '用于原材料', prop: 'forRawMaterials' },
        { label: '非工业生产消费', prop: 'nonIndustrialProduction' },
        { label: '合计中:运输工具消费', prop: 'transportationConsumption' },
      ]
    },
    { label: '期末库存量', prop: 'endingInventory' },
    { label: '采用折标系数', prop: 'useScalingFactor' },
    { label: '参考折标系数', prop: 'referenceDiscountFactor' },
  ]
}

// 公司产品表 Company product list
export const COMPANY_PRODUCT_LIST = {
  ID: 6,
  NAME: '公司产品表',
  COLUMNS: [
    { label: '主要产品名称', prop: 'productName' },
    {
      label: '年产能',
      prop: 'B',
      children: [
        { label: '数量', prop: 'quantity' },
        { label: '计量单位', prop: 'unitOfMeasurement' },
      ]
    },
    {
      label: '年产量',
      prop: 'C',
      children: [
        { label: '数量', prop: 'quantityOne' },
        { label: '计量单位', prop: 'unitOfMeasurementOne' },
      ]
    },
    {
      label: '单位产品能耗',
      prop: 'D',
      children: [
        { label: '数值', prop: 'numericalValue' },
        { label: '计量单位', prop: 'unitOfMeasurementTwo' },
      ]
    },
    { label: '备注', prop: 'remark' },
  ]
}

// 公司指标明细表 Detailed list of company indicators
export const DETAILED_LIST_OF_COMPANY_INDICATORS = {
  ID: 7,
  NAME: '公司指标明细表',
  COLUMNS: [
    { label: '指标名称', prop: 'indicatorName' },
    { label: '计量单位', prop: 'unitOfMeasurement' },
    { label: '本期值', prop: 'currentValue' },
    { label: '上年值', prop: 'previousYearValue' },
    { label: '同比变化率', prop: 'yearOnYearChangeRate', unit: '%' },
    { label: '产值及能源消费变化情况说明', prop: 'remark' },
  ]
}

// 能源消费结构副表 Energy consumption structure sub table
export const ENERGY_CONSUMPTION_STRUCTURE_SUB_TABLE = {
  ID: 8,
  NAME: '能源消费结构副表',
  COLUMNS: [
    { label: '能源名称', prop: 'energyName' },
    { label: '计量单位', prop: 'unitOfMeasurement' },
    { label: '代码', prop: 'code' },
    { label: '工业生产消费量', prop: 'industrialProduction' },
    { label: '加工转换投入合计', prop: 'machiningConversion' },
    { label: '火力发电', prop: 'thermalPowerGeneration' },
    { label: '供热', prop: 'heating' },
    { label: '原煤入洗', prop: 'rawCoalIsWashed' },
    { label: '炼焦', prop: 'coking' },
    { label: '炼油', prop: 'refining' },
    { label: '制气', prop: 'gasProduction' },
    { label: '天然气液化', prop: 'naturalGasLiquefaction' },
    { label: '加工煤制品', prop: 'processedCoalProducts' },
    { label: '能源加工转换产出', prop: 'conversionOutput' },
    { label: '能源加工转换产出折标量', prop: 'conversionOutputDiscount', unit: '吨标准煤' },
    { label: '回收利用', prop: 'recycleAndReuse' },
    { label: '采用折标系数', prop: 'useScalingFactor' },
    { label: '参考折标系数', prop: 'referenceDiscountFactor' },
  ]
}

// 企业数据填报表相关配置
export const TABLE_ACCOUNT_CONFIGS = {
  PROGRESS_ENERGY_SAVING_TARGET_COMPLETION_TABLE,
  TABLE_OF_COMPREHENSIVE_ENERGY_CONSUMPTION_PER_UNIT_PRODUCT,
  CONDITION_TABLE_OF_MAJOR_ENERGY_CONSUMING_EQUIPMENT,
  ENERGY_SAVING_RENOVATION_PROJECT_INFORMATION_TABLE,
  ENERGY_CONSUMPTION_STRUCTURE_TABLE,
  COMPANY_PRODUCT_LIST,
  DETAILED_LIST_OF_COMPANY_INDICATORS,
  ENERGY_CONSUMPTION_STRUCTURE_SUB_TABLE,
}

// 企业基本情况表
export const ENTERPRISE_BASIC_INFORMATION_TABLE_ID = 9
export const ENTERPRISE_BASIC_INFORMATION_TABLE_NAME = '企业基本情况表'

// 表状态：未上报
export const TABLE_UNDER_REPORT = '2'
export const TABLE_UNDER_REPORT_TEXT = '未上报'

// 表状态：暂存
export const TABLE_STAGE = '1'
export const TABLE_STAGE_TEXT = '暂存'

// 表状态：已上报
export const TABLE_REPORTED = '3'
export const TABLE_REPORTED_TEXT = '已上报'

// 表状态：已通过
export const TABLE_RESOLVED = '4'
export const TABLE_RESOLVED_TEXT = '已通过'

// 表状态：已退回
export const TABLE_REJECTED = '5'
export const TABLE_REJECTED_TEXT = '已退回'

// 表数据年份、季度字段
export const TABLE_FIELD_YEAR = 'year'
export const TABLE_FIELD_QUARTER = 'quarter'

// 企业报表状态
export const TABLE_ACCOUNT_STATUS = [
  {
    name: TABLE_UNDER_REPORT_TEXT,
    value: TABLE_UNDER_REPORT,
  },
  {
    name: TABLE_STAGE_TEXT,
    value: TABLE_STAGE,
  },
  {
    name: TABLE_REPORTED_TEXT,
    value: TABLE_REPORTED,
  },
  {
    name: TABLE_RESOLVED_TEXT,
    value: TABLE_RESOLVED,
  },
  {
    name: TABLE_REJECTED_TEXT,
    value: TABLE_REJECTED,
  }
]
